import json

def backup_security_policy(policy, backup_path):
    """
    备份安全策略
    :param policy: 安全策略
    :param backup_path: 备份路径
    :return: 备份成功
    """
    with open(backup_path, "w") as f:
        json.dump(policy, f)
    return True

# 示例
policy = define_security_policy()
backup_path = "policy_backup.json"
backup_security_policy(policy, backup_path)
print(f"Policy backed up to {backup_path}")